package com.zsr.example.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zsr.example.entity.TOrder;
import com.zsr.example.vo.OrderReq;
import com.zsr.example.vo.TOrderVo;

import java.util.List;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author zsr
 * @since 2021-12-06
 */
public interface TOrderService extends IService<TOrder> {

    String saveOrder(Integer targetType,String courseId, String memberIdByJwtToken);

    /**
     * 查询课程是否购买
     * @param memberId 会员id
     * @param courseId 课程id
     * @return
     */
    boolean isBuyCourse(String memberId,Integer targetType,String courseId);

    void pageQuery(Page<TOrder> page, OrderReq orderReq);

    List<TOrderVo> orderQueryPage(OrderReq orderReq);
}
